package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 财务信息（往来单位  及 开票信息 ）
 * </p>
 *
 * @author baiqiang
 * @since 2020-10-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_finance_info")
@ApiModel(value="CrmFinanceInfo对象", description="财务信息（往来单位  及 开票信息 ）")
public class CrmFinanceInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "会计年度")
    @TableField("fiscal_year")
    private Integer fiscalYear;

    @ApiModelProperty(value = "公司id（租户ID）")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "客户ID（往来单位）")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "往来性质：1:客户，2:供应商，3:客户/供应商")
    @TableField("partner_type")
    private Integer partnerType;

    @ApiModelProperty(value = "往来单位 社会统一代码")
    @TableField("company_number")
    private String companyNumber;

    @ApiModelProperty(value = "发票类型")
    @TableField("invoice_type")
    private String invoiceType;

    @ApiModelProperty(value = "纳税性质(一般纳税人/小规模税人)")
    @TableField("tax_nature")
    private String taxNature;

    @ApiModelProperty(value = "税率")
    @TableField("tax_rate")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "电话（开票电话）")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "地址（开票地址）")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "开户银行")
    @TableField("opening_bank")
    private String openingBank;

    @ApiModelProperty(value = "银行账户")
    @TableField("bank_account")
    private String bankAccount;

    @ApiModelProperty(value = "信用等级")
    @TableField("credit_grade")
    private String creditGrade;

    @ApiModelProperty(value = "信用额度")
    @TableField("credit_limit")
    private BigDecimal creditLimit;

    @ApiModelProperty(value = "风险等级")
    @TableField("risk_level")
    private String riskLevel;

    @ApiModelProperty(value = "注册资金")
    @TableField("register_capital")
    private BigDecimal registerCapital;

    @ApiModelProperty(value = "电子发票接收邮件")
    @TableField("electronic_invoice_email")
    private String electronicInvoiceEmail;

    @ApiModelProperty(value = "电子发票接收电话")
    @TableField("electronic_invoice_phone")
    private String electronicInvoicePhone;

    @ApiModelProperty(value = "往来单位联系人")
    @TableField("contact_man")
    private String contactMan;

    @ApiModelProperty(value = "往来单位联系电话")
    @TableField("contact_phone")
    private String contactPhone;

    @ApiModelProperty(value = "往来单位联系人地址")
    @TableField("contact_address")
    private String contactAddress;

    @ApiModelProperty(value = "租户分管部门ID")
    @TableField("charge_office_id")
    private Integer chargeOfficeId;

    @ApiModelProperty(value = "租户分管部门名称")
    @TableField("charge_office_name")
    private String chargeOfficeName;

    @ApiModelProperty(value = "租户分管人员ID")
    @TableField("charge_user_id")
    private Integer chargeUserId;

    @ApiModelProperty(value = "租户分管人员名称")
    @TableField("charge_user_name")
    private String chargeUserName;

    @ApiModelProperty(value = "描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改人")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "状态(0:正常 1:删除 2：停用)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "客户名称")
    @TableField(exist = false)
    private String crmName;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

}
